libxl: make it possible to disable vnc
authorZhou Peng <zhoupeng@nfs.iscas.ac.cn>
Fri, 20 May 2011 15:11:13 +0000 (16:11 +0100)
committerZhou Peng <zhoupeng@nfs.iscas.ac.cn>
Fri, 20 May 2011 15:11:13 +0000 (16:11 +0100)
tools/libxl/libxl__build_device_model_args_new/old: The condition is
so rigorous that user has no chance to disable the vnc,
considering what has been done in parse_config_data() by default,
which is not resonable with vnc option in vm-cfg file.

I think, If user explicitly set "vnc=0", vnc should be disabled.
User should have the chance to only use sdl, other remote
display(spice) and even nothing.

Signed-off-by: Zhou Peng <zhoupeng@nfs.iscas.ac.cn>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_dm.c

index f90c1f372ae2000fb6b19e5279a63f9b4089bbbd..952cb7d0011f5b5ec32ba23c5cab1df13059b9dc 100644 (file)
@@ -97,7 +97,7 @@ static char ** libxl__build_device_model_args_old(libxl__gc *gc,
     if (info->dom_name)
         flexarray_vappend(dm_args, "-domain-name", info->dom_name, NULL);
 
-    if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused) {
+    if (info->vnc) {
         char *vncarg;
         if (info->vncdisplay) {
             if (info->vnclisten && strchr(info->vnclisten, ':') == NULL) {
@@ -252,7 +252,7 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
     if (info->dom_name) {
         flexarray_vappend(dm_args, "-name", info->dom_name, NULL);
     }
-    if (info->vnc || info->vncdisplay || info->vnclisten || info->vncunused) {
+    if (info->vnc) {
         int display = 0;
         const char *listen = "127.0.0.1";